﻿// code06020100.cpp : 参数传递
// 指针形参 值传递

#include <iostream>
using namespace std;
void reset(int*  ptr)
{
    *ptr = 0;
    ptr = nullptr;
}

int main()
{
    int n = 42;
    int* p = &n;
    cout << n << " "<<(p==nullptr)<<endl;
    reset(p);
    cout << n <<" "<< (p == nullptr) << endl;

    return 0;


}

